package com.molin.genericityclass;

public class Demo4 {

    public static void main(String[] args) {
        GenerictyImpl<String> stringGenericty = new GenerictyImpl<>();
        stringGenericty.method("小丽给我的情话");
        GenerictyImpl2 generictyImpl2=new GenerictyImpl2();
        generictyImpl2.method(19);
    }
}

interface Genericty<E> {
    public abstract void method(E e);
}

class GenerictyImpl<E> implements Genericty<E> {
    @Override
    public void method(E e) {
        System.out.println(e);
    }
}
class GenerictyImpl2 implements Genericty<Integer>{

    @Override
    public void method(Integer integer) {
        System.out.println(integer);
    }
}